/*
*	Purpose: To aid in the transfer of data from Lua to C++; ie: specifying a special type to use in Lua (like colors, fonts, etc)
*				Also holds the IDs used between Lua and C++
*	Type: Singleton
*/

#pragma once

#include "Globals.hpp"
#include "OpenGL.hpp"
#include "ExecutionLog.h"

#include <string>
#include <map>
using namespace std;

#define Key GenericKeys::Instance()

class GenericKeys
{

private:
	GenericKeys(){};
	GenericKeys(const GenericKeys&);
	GenericKeys& operator =(const GenericKeys&);
	~GenericKeys(){};

	// Our maps
	static map<string, OGL_Color>	IDToColorMap;
	static map<string, GLFT_Font>	IDToGLFT_Font;

	GLFT_Font Crystal;
	GLFT_Font Bank_Printer;
	GLFT_Font Inconsolata;
	GLFT_Font Onuava;
	GLFT_Font Self_Destruct;
	GLFT_Font Onuava_Big;
	GLFT_Font Crystal_Big;
	GLFT_Font Onuava_Small;

	struct PanelIDs
	{
		int Menu_Screen, Menu_NewGame, Menu_Editor, Menu_Exit, Menu_MapSelector,

			Game_Unit,

			Editor_Tiles, Editor_Algorithms, Editor_AlgorithmsBOX, Editor_AlgorithmsSNAKEFAST, Editor_AlgorithmsFOCUSPOINT,
			Editor_Buttons, Editor_buttonID_displaySelection, Editor_buttonID_buildRoom, Editor_buttonID_buildPath, Editor_buttonID_saveToLua,
				Editor_buttonID_moveRooms, Editor_buttonID_removeRoom,

			MapSelector_Screen, MapSelector_Close, MapSelector_NotRec;
	};
	
	PanelIDs m_PanelIDs;

public:
	static GenericKeys* Instance();

	void Init(); // Set values to all of the maps
	void Destroy();

	// Accessor functions
	OGL_Color GetColor(const char* id);// {return IDToColorMap[id];}
	GLFT_Font* GetFont(string id) {return &(IDToGLFT_Font[id]);}


	// Panel IDs -- Without using an ID system, communcation with Lua would be extremenly complex.
	
	PanelIDs* GetPanelIDs() {return &m_PanelIDs;}

};


